#include <iostream>
using namespace std;
int fibonacci(int i){
	int a=1,b=1,c;
	cout<<a<<","<<b<<",";
	while(1){
		c=a;
		a=b;
		b=c+b;
		cout<<b;
		if(b+a >= i){
			cout << "." << endl;
			break;
		}
		else{
			cout<<",";
		}
	}
	return 0;
}
int main(){
	int k;
	cin>>k;
	fibonacci(k);
	return 0;
}
